package day03;

import java.util.Scanner;

public class text {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
       /* System.out.println(5%2);//1
        System.out.println(10%3);//1
        int a=1,b=1,c=1,d=1,e,f;
        a++;
        System.out.println(a);//2
        ++a;
        System.out.println(a);//3
        b++;
        System.out.println(b);//2
        ++b;
        System.out.println(b);//3
        c--;
        System.out.println(c);//0
        --c;
        System.out.println(c);//-1
        d--;
        System.out.println(d);//0
        --d;
        System.out.println(d); //-1
        System.out.println(f=b++);//3
        System.out.println(f=++b);//5
        System.out.println(f=--b);//4
        System.out.println(f=b--);//4*/

        /*int a=5,b=10;
        int c= a > b ? a : b;
        System.out.println(c);

        if(a>b){
            System.out.println(a);
        }else {
            System.out.println(b);
        }


        int year;

        System.out.println("请输入一个年份");//提示
        year = sc.nextInt();//输入年份
        if(year%4==0&&year%100!=0||year%400==0){//年份判断条件
            System.out.println(year+"是闰年");
        }else {
            System.out.println(year+"是平年");
        }*/

        /*int algebra;

        do {
            algebra =0;
            System.out.println("请输入您的成绩");
            int score =sc.nextInt();//输入成绩
            if(score >=0 && score <=100){
                score /=10;
                switch (score){
                    case 10: case 9:
                        System.out.println("A");
                        break;
                    case 8:
                        System.out.println("B");
                        break;
                    case 7:
                        System.out.println("C");
                        break;
                    default:
                        System.out.println("D");
                }
            }else {
                System.out.println("成绩不合法请重新输入");
                algebra = 1;
            }
        }while (algebra!=0);*/


        //月份求解
        /*System.out.println("请输入年份");
        int year = sc.nextInt();
        System.out.println("请输入月份");
        int month = sc.nextInt();
        int day;
        do {
            if (month >= 1 && month <= 12) {
                switch (month) {
                    case 1:
                    case 3:
                    case 5:
                    case 7:
                    case 8:
                    case 10:
                    case 12:
                        day = 31;
                        break;
                    case 4:
                    case 6:
                    case 9:
                    case 11:
                        day = 30;
                        break;
                    default:
                        if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0) {
                            day = 29;
                        } else {
                            day = 28;
                        }
                }
                System.out.println(month + "月的天数为" + day + "天");
            } else {
                System.out.println("月分不合法请重新输入");
            }
        }while (month<1 || month>12);

         */


    }
}
